package com.zsrt.devbase.common.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName: ResponseMegDTO
 * @Description: 专门用于封装响应数据的对象
 * @author 曾瑶
 * @version V1.0
 */
public class ResponseMsgUtil {
	private Map<String,Object> map = new HashMap<String,Object>();
	public void setCheckErrMsg(String checkErrMsg) {
		map.put("flag", false);
		map.put(ConstantDefine.CHECK_ERROR, checkErrMsg);
	}
	public void setFieldErrMsg(Object fieldErrMsg) {
		map.put("flag", false);
		map.put(ConstantDefine.FIELD_ERR_MSG, fieldErrMsg);
	}
	public void setSysErrorMsg(String sysErrorMsg) {
		map.put("flag", false);
		map.put(ConstantDefine.SYS_ERR_MSG, sysErrorMsg);
	}
	public void setSuccessMsg(String successMsg) {
		map.put("flag", true);
		map.put(ConstantDefine.SUCCESS_MSG, successMsg);
	}
	public void setResultObject(Object resultObject) {
		map.put("flag", true);
		map.put("resultObject", resultObject);
	}
	public void setRows(Object rows) {
		map.put(ConstantDefine.ROWS, rows);
	}
	public Map<String,Object> getMegMap(){
		return map;
	}
}
